package com.thingsgrid.device.base;

import com.thingsgrid.device.entity.Product;
import com.thingsgrid.device.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 功能说明：产品抽象类
 *
 * @author 李龙飞
 * @since 2019/9/18 15:33
 */
public abstract class AbstractProduct {

	@Autowired
	private ProductMapper productMapper;

	/**
	 *说明：获取产品信息
	 *@author lilongfei
	 *@since 2019/9/18 15:37
	 */
	public Product getProductById(String productId){
		return productMapper.getProductById(productId);
	}

	/**
	 *说明：获取产品列表
	 *@author lilongfei
	 *@since 2019/9/25 15:09
	 */
	public List<Product> getProductList(){
		return productMapper.getProductList();
	}

}
